Convert __init into __devinit in wakeup path.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 11 Jul 2007 16:57:47 +0000 (17:57 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 11 Jul 2007 16:57:47 +0000 (17:57 +0100)
Need to ensure all the code slice in the wakeup path still
existing. For this purpose, we have to use __devinit instead
of __init, since the former is null for CONFIG_HOTPLUG while
the latter always causes related code to be free-ed after
first boot.

Later when adding __init to some function, be sure to consider
wakeup case and cpu hotplug!

Signed-off-by <Kevin.Tian@intel.com>

xen/arch/x86/apic.c
xen/arch/x86/i8259.c
xen/arch/x86/nmi.c
xen/arch/x86/x86_32/traps.c
xen/arch/x86/x86_64/traps.c
xen/drivers/char/ns16550.c
xen/drivers/char/serial.c

index 3c6a14d43c814331b37c502142d998662a3e31ee..7edccb44b444e4a853239728d64b2ede7768ae8b 100644 (file)
@@ -957,7 +957,7 @@ void __setup_APIC_LVTT(unsigned int clocks)
     apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR);
 }
 
-static void __init setup_APIC_timer(unsigned int clocks)
+static void __devinit setup_APIC_timer(unsigned int clocks)
 {
     unsigned long flags;
     local_irq_save(flags);
index ecda0f121221129842216b332fe5c01b6259dc7b..b02606af39d5b0c5e30ae347c2e7f1d7139d71a3 100644 (file)
@@ -336,7 +336,7 @@ int i8259A_suspend(void)
     return 0;
 }
 
-void __init init_8259A(int auto_eoi)
+void __devinit init_8259A(int auto_eoi)
 {
     unsigned long flags;
 
index f226e90a128ff00795f9a325e59c2db3c17c8594..2bf72d1f8fef606a94cdec189873c19bf3be6b81 100644 (file)
@@ -202,7 +202,7 @@ void release_lapic_nmi(void)
         enable_lapic_nmi_watchdog();
 }
 
-#define __pminit __init
+#define __pminit __devinit
 
 /*
  * Activate the NMI watchdog via the local APIC.
index ebd174deb7166c9624424c598fcaf0aa3c629795..5b391d60c101c679f5e4415990c9d2e2cb1345f9 100644 (file)
@@ -232,7 +232,7 @@ unsigned long do_iret(void)
     return 0;
 }
 
-void __init percpu_traps_init(void)
+void __devinit percpu_traps_init(void)
 {
     struct tss_struct *tss = &doublefault_tss;
     asmlinkage int hypercall(void);
index 7a9c2c11bf604856e3b8be8c898abb19a2d5dbc7..ad4577ad55d395fda15847faa3071942fa77470f 100644 (file)
@@ -285,7 +285,7 @@ static int write_stack_trampoline(
     return 34;
 }
 
-void __init percpu_traps_init(void)
+void __devinit percpu_traps_init(void)
 {
     char *stack_bottom, *stack;
     int   cpu = smp_processor_id();
index 972eb6c05df29be63fa890d69a2452094eafce40..4b37656270a9cf72c4551cdc3500ebcc12fd1a9c 100644 (file)
@@ -170,7 +170,7 @@ static int ns16550_getc(struct serial_port *port, char *pc)
     return 1;
 }
 
-static void __init ns16550_init_preirq(struct serial_port *port)
+static void __devinit ns16550_init_preirq(struct serial_port *port)
 {
     struct ns16550 *uart = port->uart;
     unsigned char lcr;
@@ -214,7 +214,7 @@ static void __init ns16550_init_preirq(struct serial_port *port)
         port->tx_fifo_size = 16;
 }
 
-static void __init ns16550_init_postirq(struct serial_port *port)
+static void __devinit ns16550_init_postirq(struct serial_port *port)
 {
     struct ns16550 *uart = port->uart;
     int rc, bits;
index bb196ace109d98092f4e25848b976207d040ff7c..921606454ababbf60d9b01819f9842c587c9f0a6 100644 (file)
@@ -348,7 +348,7 @@ int serial_tx_space(int handle)
     return SERIAL_TXBUFSZ - (port->txbufp - port->txbufc);
 }
 
-void __init serial_init_preirq(void)
+void __devinit serial_init_preirq(void)
 {
     int i;
     for ( i = 0; i < ARRAY_SIZE(com); i++ )
@@ -356,7 +356,7 @@ void __init serial_init_preirq(void)
             com[i].driver->init_preirq(&com[i]);
 }
 
-void __init serial_init_postirq(void)
+void __devinit serial_init_postirq(void)
 {
     int i;
     for ( i = 0; i < ARRAY_SIZE(com); i++ )